

********************
** Load income data for 2018 (main analysis year)


import delimited "$datapath/ACSST5Y2018.S1901_data_with_overlays_2022-04-11T115813.csv", varnames(1) rowrange(3) clear 

	gen medinc = real(s1901_c04_012e) 
	gen meaninc = real(s1901_c04_013e)
	
	keep medinc meaninc geo_id
	
********************
** observation identifiers 

	gen fipsst = real(substr(geo_id,10,2))
	gen fipsplac = real(substr(geo_id,12,5))

	keep fipsst fipsplac medinc meaninc 

	
save "$datapath/clean/income_place_data.dta", replace 


